package com.example.myliwu.fragment;

import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toolbar;


import androidx.annotation.RequiresApi;

import com.example.myliwu.CourseAdapter;
import com.example.myliwu.R;

import java.io.IOException;
import java.sql.Time;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

/**
 * 主页
 */

public class HomeFragment extends BaseFragment {
    private ListView mlistView;
    private Toolbar toolbar;

    @RequiresApi(api = Build.VERSION_CODES.M)
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        mcontext = getActivity();
        View view = inflater.inflate(R.layout.fragment_home, container, false);

//        ImageView imageView = view.findViewById(R.id.img_fish);
//        Drawable drawable = imageView.getDrawable();
//        AnimationDrawable fishAni = (AnimationDrawable) drawable;
//        fishAni.start();

//        ListView listView= view.findViewById(R.id.listView_home);

//        List<String> mockList = new ArrayList<>();
//        for (int i=0;i<100;i++){
//            mockList.add("这是第"+i+"数据");
//        }
//        listView.setAdapter(new CourseAdapter(mockList,mcontext));
        return view;
    }


}